We present an {\it ab initio} approach for the computation of the magnetic susceptibility $\chi$ of insulators. The approach is applied to compute $\chi$ in diamond and in solid neon using density functional theory in the local density approximation, obtaining good agreement with experimental data. In solid neon, we predict an observable dependence of $\chi$ upon pressure.